<template>
  <div class="fenye">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="curPage"
      :page-sizes="[5, 10, 15]"
      :page-size="num"
      layout="total, sizes, prev, pager, next, jumper"
      :total="allNum">
    </el-pagination>
  </div>
</template>

<script>
export default {
  name:"Fenye",
  props:{
    num:{
      type:Number,
      default:5
    },
    allNum:Number,
    curPage:{
      type:Number,
      default:1
    }
  },
  methods:{
    handleSizeChange(val){
      this.$emit('sizeChange',val)
    },
    handleCurrentChange(val){
      console.log(val)
      this.$emit('currChange',val)
    }
  }
}
</script>

<style scoped lang="less">
  .fenye{
    margin: 40px;
    float: right;
    padding-bottom: 40px;
  }
</style>